﻿<%@ Page Language="VB" MasterPageFile="~/MasterCliente.master" AutoEventWireup="false" CodeFile="Carrito.aspx.vb" Inherits="Carrito" title="Página sin título" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table width=100%>
        <tr>
            <td align=center style="width: 539px; height: 20px;">
                <asp:Label ID="Label1" runat="server" BackColor="#66CCFF" Font-Bold="True" Font-Names="Verdana"
                    Text="CARRITO DE COMPRAS"></asp:Label></td>
           
        </tr>
        <tr>
            <td align=center style="width: 539px; height: 20px;">
                <asp:Image ID="Image1" runat="server" Height="73px" Width="89px" 
                    ImageUrl="~/Pictures/carrito2.gif" />
            </td>
           
        </tr>
          <tr>
            <td align=left style="width: 539px; height: 21px;">
                &nbsp;<asp:Label ID="lblfecha" runat="server" Font-Bold="True"></asp:Label></td>
           
        </tr>
          <tr>
            <td align=left style="width: 539px; height: 21px;">
                &nbsp;<asp:Label ID="lblreserva" runat="server" Font-Bold="True"></asp:Label></td>
           
        </tr>
          <tr>
            <td align=center style="width: 539px">
                <asp:Repeater ID="repcarrito" runat="server" OnItemCommand="CambiarCantidad">
                        <HeaderTemplate>
						<table border="1" cellpadding="3" style="background-color:#66CCFF; border-collapse:collapse" width=100%>
										<tr>
										    <th>
												Quitar Item</th>
											<th>
												Código Item</th>
											<th>
												Servicio</th>
											<th>
												Precio</th>
											<th>
												Cantidad</th>
											<th>
												Subtotal</th>
										</tr>
			            </HeaderTemplate>
								<ItemTemplate>
									<tr>
									    <td align="center">
									        <asp:Button ID="Button2" Text="Quitar" class="small"  runat="server" CommandName='<%# Container.DataItem("COD_SERV") %>'/>
									    </td>
										<td align="center"><%#Container.DataItem("COD_SERV")%></td>
										<td align="left"><%#Container.DataItem("NOM_SERV")%></td>
										<td align="right"><%#Container.DataItem("PRE_SERV")%></td>
										<td align="center">
											<asp:textbox id="txtcantidad" runat="server" Text='<%# Container.DataItem("CANTIDAD") %>' MaxLength="2" Style="width:30px; text-align:right"/>
											<asp:button ID="Button1" Text="Actualizar" class="small" runat="server" CommandName='<%# Container.DataItem("COD_SERV") %>'/>
										</td>
										<td align="right"><%#FormatNumber(SubTotalReserva(Container.DataItem("PRE_SERV"), Container.DataItem("CANTIDAD")), 2)%></td>
									</tr>
								</ItemTemplate>
			        <FooterTemplate>
									<tr>
										<td align="right" colspan="4">
										</td>
										<td align="right"></td>
									</tr>
									<tr>
										<th align="right" colspan="4">
											Monto total de la Reserva:
										</th>
										<td align="right"><b><%#FormatCurrency(ImporteTotalReserva())%></b></td>
									</tr>
			    </table>
			        </FooterTemplate>
								
                </asp:Repeater>
                &nbsp;</td>
           
        </tr>
          <tr>
            <td align=left style="width: 539px">
                <asp:Label ID="lblerror" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="Large"></asp:Label></td>
           
        </tr>
          <tr>
            <td align=left style="width: 539px">
                &nbsp;<asp:Button ID="btnpagar" runat="server" Text="Pagar" /></td>
           
        </tr>
        
    </table>
</asp:Content>

